package admin.board.genre.action;

import java.sql.SQLException;
import java.util.List;

import admin.board.genre.dao.GenreDao;
import admin.board.genre.dto.GenreDto;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ListAction extends ActionSupport {
	private List<GenreDto> genreList;
	private GenreDao dao;
	private int selectNum;
	
	public ListAction() {
		dao = GenreDao.getInstance();
	}
	
	public String execute() throws SQLException {
		genreList = dao.list(selectNum);
		return SUCCESS;
	}


	public List<GenreDto> getGenreList() {
		return genreList;
	}


	public GenreDao getDao() {
		return dao;
	}


	public void setSelectNum(int selectNum) {
		this.selectNum = selectNum;
	}
}
